function isObject(value:any){
    return value!==null&&typeof value === 'object'
  }
  export function deepClone(originValue:any,map = new WeakMap()){
    // if(originValue instanceof Set){
    //   return new Set([...originValue])
    // }
    // if(originValue instanceof Map){
    //   return new Map([...originValue])
    // }
    if(typeof originValue === 'symbol'){
      return Symbol(originValue.description)
    }
    if(!isObject(originValue)){
      return originValue
    }
    if(map.has(originValue)){
      return map.get(originValue)
    }
    const newObj:any = Array.isArray(originValue)?[]:{}
    map.set(originValue,newObj)
    for(let key in originValue){
      newObj[key] = deepClone(originValue[key],map)
    }
    // let symbolKeys = Object.getOwnPropertySymbols(originValue)
    // for(let key in symbolKeys){
    //   newObj[key] = deepClone(symbolKeys[key],map)
    // }
    return newObj
  }